'use strict';
var router = require('koa-router')();
var koaBody = require('koa-body');
//加载控制器
var user = require('./controller/user');
var token = require('./controller/token');
//用户登录获取access_token
router.get('/gettoken',token.gettoken);
//获取用户列表list
router.get('/user/list', user.list);
//获取用户详情
router.get('/user/getuser', user.getuser);
//创建用户
router.post('/user/createuser', user.createuser);

router.put('/user/:id', user.editUser);
router.delete('/user/:id', user.deleteUser);

module.exports = router;
